export default class extends think.Model{
    async getPageContent(page: number, uids: string[], cids: string[], orderStr: string, num: number,complex:Object) {

        return this.alias('c').join({
            users: {
                on: ['user_id', 'id'],
                as: 'u'
            },
            column: {
                on: ['cid', 'id'],
                as: 'cl'
            },
        }).field('c.*, u.username, cl.column')
            .where({
                _complex: complex
            })
            .order(orderStr)
            .page(page, num).select();
    }
};
